package com.hrt.manage.sncode.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.hrt.bean.SnCodeSequence;
import com.hrt.bean.StockDetail;

public interface SNCodeService {

	public Long saveSnCode(SnCodeSequence snCode);
	
	public Long updateSnCode(SnCodeSequence snCode);
	
	public SnCodeSequence getSnCodeById(Long id);
	
	public SnCodeSequence getSnCodeByCode(String snCode);
	
	/**
	 * 根据库单详情，生成条形码
	 * @param detail
	 * @param resouceType
	 * @return
	 */
	
	public List<SnCodeSequence> genarateSnCodeByCode(StockDetail detail, Integer resouceType);

	/**
	 * 根据条形码和类型查询条形码实体
	 * @param snCode
	 * @param reType
	 * @return
	 */
	public SnCodeSequence getSnCodeByCode(String snCode, Integer reType);

	
	/**
	 * 根据单号查出所有被使用的SNCode
	 * @param stockId
	 * @return
	 */
	public  List<SnCodeSequence>  querySnCodeByStockId(Long stockId);

	/**
	 * 删除条形码
	 * @param id
	 * @return
	 */
	@Transactional
	public Long delSNCodeById(Long id);
}
